<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>slot-举例</title>
</head>
<body>

<select>
    <option value="1">北京</option>
    <option value="2">天津</option>
</select>
<div id="app">
   <select3 :items="cities"></select3>
</div>
</body>
<script src="../../lib/vue.js"></script>
<script type="text/x-template" id="slt">
    <select>
        <option v-for="item in items" :value="item.id">{{item.name}}</option>
    </select>
</script>
<script>


    var select3 = {
        props: ['items'],
        template: '#slt'

    }

    var cities = [
        {
            id: 1,
            name: '天津'
        }, {
            id: 2,
            name: '北京'
        }]

    new Vue({
        el: '#app',
        components:{
            select3
        },
        data: {
            cities: []
        },mounted:function () {
            this.cities =cities;
        }
    })

</script>

</html>